<template>
  <!-- 放置一个图标 -->
  <div style="font-size: 34px; cursor: pointer; margin-right: 18px;">
    <i style="font-size: 20px;" class="iconfont icon-quanping1 lang_color" @click="changeScreen" />
  </div>
</template>

<script>
import ScreenFull from 'screenfull'
export default {
  methods: {
    //   改变全屏
    changeScreen() {
      if (!ScreenFull.isEnabled) {
        // 此时全屏不可用
        this.$message.warning('此时全屏组件不可用')
        return
      }
      // document.documentElement.requestFullscreen()  原生js调用
      //   如果可用 就可以全屏
      ScreenFull.toggle()
    }
  }
}
</script>
<style lang="scss" scoped>
@import "@/styles/variables.scss";
.lang_color {
  color: $navbarText;
  font-size: 21px;
  line-height: 28px;
}

</style>
